//
// Created by qin15 on 2025/3/12.
//

#ifndef FFMPEGGNI_JCAVCODECHANDLER_H
#define FFMPEGGNI_JCAVCODECHANDLER_H


#include <mutex>
#include <iostream>
#include <atomic>
#include <thread>
#include <vector>

extern "C" {

#include<libavcodec/avcodec.h>
#include<libavformat/avformat.h>
#include<libswscale/swscale.h>
#include <libswresample/swresample.h>
#include <libavutil/imgutils.h>

}

#ifndef int64
#define int64 long long
#endif

class JCAVCodecHandler {
public:
    explicit JCAVCodecHandler();
    virtual ~JCAVCodecHandler();

    void         SetVideoFilePath(std::string& path);
    std::string  GetVideoFilePath();

    int      GetVideoWidth();
    int      GetVideoHeight();

    int      InitVideoCodec();
    void     UnInitVideoCodec();

    void     StartPlayVideo();
    void     StopPlayVideo();

};


#endif //FFMPEGGNI_JCAVCODECHANDLER_H
